import React,{Component} from 'react'
import { Tooltip, Button, Table } from 'antd'
import { inject, observer } from 'mobx-react';
import './index.less'
/**
 * 名称：数据源页面
 * 描述：通过表格展示数据
 * 调用：主页面
 * 输入： 
 * 时间：20220402
 */
 @inject("dataSourceStore")
 @observer
class DataSrouce extends Component{
    constructor(props){
        super(props)
        const {dataSourceStore} = props
        dataSourceStore.apiCrowdData()
        dataSourceStore.apiFlowData()
        dataSourceStore.apiMarketingData()
        
    }
    render(){
        const {dataSourceStore} = this.props
        return (
            <div className ="index">
                
                {/* <Tooltip className="tip" placement="topLeft" title="Prompt Text">
                    <Button>人群明细表</Button>
                </Tooltip>
                <Table dataSource={dataSourceStore.crowdData} columns={dataSourceStore.crowdFields} pagination={{ pageSize: 50 }}  scroll={{ x: 1500,y: 300 }} /> */}
                <Tooltip className="tip" placement="topLeft" title="Prompt Text">
                    <Button>人群流水表</Button>
                </Tooltip>
                <Table dataSource={dataSourceStore.flowData} columns={dataSourceStore.flowFields} pagination={{ pageSize: 50 }}  scroll={{ x: 800,y: 300 }} />
                <Tooltip className="tip" placement="topLeft" title="Prompt Text">
                    <Button>营销流水表</Button>
                </Tooltip>
                <Table dataSource={dataSourceStore.marketingData} columns={dataSourceStore.marketingFields} pagination={{ pageSize: 50 }}  scroll={{ x: 800,y: 300 }} />
                
            </div>
        )
    }

}
export default DataSrouce